﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PasteLoggerBoard.EntityFrameworkCore.Migrations
{
    public partial class add_useragent : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ClientIP",
                table: "PTLogWarning");

            migrationBuilder.DropColumn(
                name: "TimeLong",
                table: "PTLogWarning");

            migrationBuilder.DropColumn(
                name: "TimeLong",
                table: "PTLogInfo");

            migrationBuilder.DropColumn(
                name: "TimeLong",
                table: "PTLogException");

            migrationBuilder.DropColumn(
                name: "TimeLong",
                table: "PTLogError");

            migrationBuilder.AddColumn<string>(
                name: "Host",
                table: "PTLogWarning",
                type: "character varying(64)",
                maxLength: 64,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Host",
                table: "PTLogInfo",
                type: "character varying(64)",
                maxLength: 64,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UserAgent",
                table: "PTLogInfo",
                type: "character varying(128)",
                maxLength: 128,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Host",
                table: "PTLogException",
                type: "character varying(64)",
                maxLength: 64,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UserAgent",
                table: "PTLogException",
                type: "character varying(128)",
                maxLength: 128,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Host",
                table: "PTLogError",
                type: "character varying(64)",
                maxLength: 64,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "UserAgent",
                table: "PTLogError",
                type: "character varying(128)",
                maxLength: 128,
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Host",
                table: "PTLogWarning");

            migrationBuilder.DropColumn(
                name: "Host",
                table: "PTLogInfo");

            migrationBuilder.DropColumn(
                name: "UserAgent",
                table: "PTLogInfo");

            migrationBuilder.DropColumn(
                name: "Host",
                table: "PTLogException");

            migrationBuilder.DropColumn(
                name: "UserAgent",
                table: "PTLogException");

            migrationBuilder.DropColumn(
                name: "Host",
                table: "PTLogError");

            migrationBuilder.DropColumn(
                name: "UserAgent",
                table: "PTLogError");

            migrationBuilder.AddColumn<string>(
                name: "ClientIP",
                table: "PTLogWarning",
                type: "character varying(32)",
                maxLength: 32,
                nullable: true);

            migrationBuilder.AddColumn<long>(
                name: "TimeLong",
                table: "PTLogWarning",
                type: "bigint",
                nullable: false,
                defaultValue: 0L);

            migrationBuilder.AddColumn<long>(
                name: "TimeLong",
                table: "PTLogInfo",
                type: "bigint",
                nullable: false,
                defaultValue: 0L);

            migrationBuilder.AddColumn<long>(
                name: "TimeLong",
                table: "PTLogException",
                type: "bigint",
                nullable: false,
                defaultValue: 0L);

            migrationBuilder.AddColumn<long>(
                name: "TimeLong",
                table: "PTLogError",
                type: "bigint",
                nullable: false,
                defaultValue: 0L);
        }
    }
}
